
import Layout from '@/layout'

const systemRouter = {
  path: '/inventory',
  type: 'top',
  component: Layout,
  redirect: '/inventory',
  name: 'Inventory',
  meta: {
    title: 'Inventory',
    icon: 'chart'
  },
  children: [
    {
      path: '/inventory/drugOutbound',
      component: { // 这时路由页面正常显示, 但这时会嵌套一层router-view; 如果把component注释掉, 页面就空了
        render: h => h('router-view')
      },
      name: 'drugOutbound',
      meta: { title: 'inventory.drugOutbound', noCache: true, icon: 'chart' },
      children: [
        {
          path: 'setting',
          component: () => import('@/views/system/tools/setting'),
          name: 'Setting',
          meta: { title: 'system.tools.setting', noCache: true }
        },
        {
          path: 'dictionary',
          component: () => import('@/views/system/tools/dictionary'),
          name: 'Dictionary',
          meta: { title: 'system.tools.dictionary', noCache: true }
        }
      ]
    }
  ]
}

export default systemRouter
